<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8"/>
<title>订单列表</title>
<meta name="keywords"  content="KEYWORDS..." />
<meta name="description" content="DESCRIPTION..." />
<meta name="author" content="DeathGhost" />
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name='apple-touch-fullscreen' content='yes'>
<meta name="apple-mobile-web-app-status-bar-style" content="black">
<meta name="format-detection" content="telephone=no">
<meta name="format-detection" content="address=no">
<link rel="icon" href="${ctxPath}/static/wap1/images/icon/favicon.ico" type="image/x-icon">
<link rel="apple-touch-icon-precomposed" sizes="57x57" href="${ctxPath}/static/wap1/images/icon/apple-touch-icon-57x57-precomposed.png">
<link rel="apple-touch-icon-precomposed" sizes="120x120" href="${ctxPath}/static/wap1/images/icon/apple-touch-icon-120x120-precomposed.png">
<link rel="apple-touch-icon-precomposed" sizes="196x196" href="${ctxPath}/static/wap1/images/icon/apple-touch-icon-196x196-precomposed.png">
<meta name="viewport" content="initial-scale=1, width=device-width, maximum-scale=1, user-scalable=no">
<link rel="stylesheet" type="text/css" href="${ctxPath}/static/wap1/css/style.css" />
<script src="${ctxPath}/static/wap1/js/jquery.js"></script>
</head>
<body>
<!--header-->
<header>
 <a href="javascript:history.go(-1);" class="iconfont backIcon">&#60;</a>
 <h1>订单列表</h1>
</header>
<div style="height:1rem;"></div>
<!--异步处理，此处不做TAB形式,注意当前状态样式currStyle-->
<aside class="orderSift">
	<a href="javascript:void(0)" onclick="bna('1',this)">待付款</a>
	<a href="javascript:void(0)" onclick="bna('2',this)">已付款</a>
	<a href="javascript:void(0)" onclick="bna('3',this)">待发货</a>
	<a href="javascript:void(0)" onclick="bna('4',this)">待收货</a>
</aside>
<!--订单列表-->
<ul class="orderList" id="bna">
 
</ul>
<div style="height:1.2rem;"></div>
@layout("/wap1/layout/footNav.html"){}
<script>

bna(1);
function bna(type,obj) {
	var lodingHtml = '<div class="tac"><img width="100" height="108" alt="" src="${ctxPath}/static/loading.gif"></div>' , _timer = null;;
	$.ajax({
		url :"${ctxPath}/wap1/person/ajax/order",
		data : {
			"order" : type
		},
		type : 'post',
		dataType : 'text',
		beforeSend:function(){
			$("#bna").html(lodingHtml);
			clearTimeout(_timer);
			
		},
		success : function(result) { 
			_timer = setTimeout(function(){
				$("#bna").html(result);
			}, 300);
		}
	});
}

function deleteC(id){
	$.ajax({
		type: "post",
 		url: '${ctxPath}/wap1、person/deleteOrder',
		data: {id:id},
		dataType: "json",
		success:function(data) {
			if(data.success){
					layer.msg("删除订单成功!",2,8);
					  window.location.reload();
			}else{
				layer.msg("删除购物车失败!",2,8);
			}
		}
	});
}
</script>
<script type="text/javascript">
  document.oncontextmenu=new Function("event.returnValue=false;");
  document.onselectstart=new Function("event.returnValue=false;"); 
</script>

</body>
</html>
